package edu.gatech.cs2340.mule.view;
import java.awt.GridLayout;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
 * This class represents the screen where the player can load a previously saved game.
 * 
 * @author J.R. O'Donnell
 */
public class LoadGamePanel extends JPanel {
	private JButton loadGameButton;
	private JButton cancelButton;
	private JButton fileSelectButton;
	private JLabel directoryLabelButton;
	private JTextField tbDirectoryField;
	
	/**
	 * Initializes the load game panel 
	 * 
	 */
	public LoadGamePanel(){
		loadGameButton = new JButton("Load Game");
		cancelButton = new JButton("Cancel");
		fileSelectButton = new JButton("Select File");
		directoryLabelButton = new JLabel("Directory");
		tbDirectoryField = new JTextField("");
		
		setLayout(new GridLayout(5,1));
		
		add(directoryLabelButton);
		add(tbDirectoryField);
		add(fileSelectButton);
		add(loadGameButton);
		add(cancelButton);
	}
	
	public void addLoadGameListener(ActionListener a) {
		loadGameButton.addActionListener(a);
	}
	
	public void addCanceleListener(ActionListener a) {
		cancelButton.addActionListener(a);
	}
	
	public void addFileSelectListener(ActionListener a) {
		fileSelectButton.addActionListener(a);
	}
	
}
